<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<script type="text/javascript" src="js/dojo/dojo.js">
		</script>

		<script type="text/javascript">
			dojo.require("com.otupia.messageSender");
			com.otupia.userInfo.init({userID:"001",userName:"caojianpu"});
			com.otupia.messageSender.init();
			
			var sender = com.otupia.messageSender;
			dojo.subscribe("testModule",testHandler);
	
			function testSend()
			{
				var message = {
					param : [
						"a","b","c"
					],
					module:"testModule",
					}
				sender.send(message,"001");
			}
			
			function testHandler(a,b,c)
			{
				console.log("******************|||||          " +a +b+c);
			}
	
		</script>
		<base href="<%=basePath%>">

		<title>My JSP 'MyJsp.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	</head>

	<body>
		<input type="button" onclick='testSend();'>
	</body>
</html>
